import Vue from 'vue'
import Router from 'vue-router'
import Home from '../views/Home.vue'
import FirstPage from '../views/FirstPage.vue'
import Collect from '../views/Collect.vue'
import Detail from '../views/Detail.vue'
import Personal from '../views/Personal.vue'
Vue.use(Router)


export default new Router({
  routes: [
    {
      path:'/',
      redirect:'/home'
    },
    {
      path: '/home',
      name: 'home',
      component: Home,
      children:[
        {  path: '/home',redirect:'/home/firstPage'},
        // {path:'/home/firstPage',component:FirstPage,name:'firstPage'},
        // {path:'/home/collect',component:Collect,name:'collect'},
        // {path:'/home/personal',component:Personal},
        // {path:'/home/detail',component:Detail,name:'detail'}
        {path:'/home/firstPage',component:FirstPage,name:'firstPage',meta:{keepAlive: true}},
        {path:'/home/collect',component:Collect,name:'collect',meta:{keepAlive: false}},
        {path:'/home/personal',component:Personal,meta:{keepAlive: false}},
        {path:'/home/detail',component:Detail,name:'detail',meta:{keepAlive: false}}
      ]
    }
  ]
})
